import { http } from '@/utils/http/axios';
const baseUrl = '/playlist';

export default {
  /**
   * @description  获取歌单所有歌曲
   * @param limit
   * @param offset
   * @param playlistId
   */
  trackAll: (limit: number = 30, offset: number = 0, playlistId: string) =>
    http.get({ url: `${baseUrl}/track/all`, params: { limit, offset, id: playlistId } }, { isTransformResponse: false }),

  /**
   * @description 歌单详情动态 说明 : 调用后可获取歌单详情动态部分,如评论数,是否收藏,播放数
   */
  dynamicDetail: (playlistId: string) => http.get({ url: `${baseUrl}/detail/dynamic`, params: { id: playlistId } }, { isTransformResponse: false }),

  /**
   * @description 获取歌单详情
   */
  playlistDetail: (playlistId: string) => http.get({ url: `${baseUrl}/detail`, params: { id: playlistId } }, { isTransformResponse: false }),
};
